import os
import openpyxl


def read_excel_data(file_path):
    """
    读取 Excel 文件中的测试数据。

    :param file_path: Excel 文件的路径
    :return: 包含测试数据的列表
    """
    test_data = []
    workbook = openpyxl.load_workbook(file_path)
    sheet = workbook.active
    headers = [cell.value for cell in sheet[1]]  # 获取表头
    for row in sheet.iter_rows(min_row=2, values_only=True):
        test_data.append(dict(zip(headers, row)))
    return test_data